package com.study.base.mutilthread.thread;

/**
 * Created by tan on 2017/9/5.
 */
public class SynchronizedTest {

	private Object lock = new Object();
	private int num = 0;
	private static int count = 0;

	public void test() {
		synchronized (lock) {
			num++;
		}
	}

	public synchronized void methodTest() {
		num++;
	}

	public synchronized static void staticMethodTest() {
		count++;
	}
}
